<?php
#+------------------------------------------------------------------
#| 普通的。
#+------------------------------------------------------------------
#| Author:Janmas Cromwell <janmas-cromwell@outlook.com>
#+------------------------------------------------------------------
namespace form\element\form\traits;

trait Prepend
{
    protected $prepend = '';

    public function prepend(string $prepend = '')
    {
        $this->prepend = $prepend;
        return $this;
    }

    protected function getPrepend(): string
    {
        return empty($this->prepend) ? '' : <<<HTML
<div class="input-group-prepend">
    <div class="input-group-text">$this->prepend</div>
</div>
HTML;
    }
}